Stream data recording device, stream data editing device, stream data reproducing device, stream data recording method, and stream data reproducing method

ABSTRACT

When recording stream data, index information and time correction information are recorded in correspondence with the stream data. The index information specifies a position of an invalid section in the stream data. The time correction information specifies a time which, supposing that a PCR included in the invalid section was able to be got, a time clock would have shown in synchronization with the PCR. When reproducing the stream data recorded together with the time correction information and the index information, at a position where the invalid section ends, the time clock can be set to a time intended by a broadcasting system, by referencing the index information and the time correction information.

This application is a Divisional of U.S. application Ser. No.11/887,187, filed Apr. 27, 2010, now U.S. Pat. No. 7,885,366 which is aNational Stage application of International application No.PCT/JP2006/308354, filed Apr. 20, 2006.

TECHNICAL FIELD

The present invention relates to techniques of receiving stream datathat is transmitted by digital broadcasting or the like and recordingthe received stream data onto a recording medium, and reproducing thestream data recorded on the recording medium. Especially, the presentinvention relates to techniques of dealing with the case when a part oftransmitted stream data is missing upon reception.

BACKGROUND ART

Conventionally, in stream data broadcasting of audio, video, and thelike directed to a fixed reception terminal such as a televisionreceiver, an error correctable coding method, for example BCH (Bose,Chaudhuri, Hocquenghem) and RS (Read Solomon), is adopted at thereceiving end in order to deal with a transmission error.

A transmission error in such stream data broadcasting directed to afixed reception terminal is caused by noise that mixes with atransmission signal due to an influence of bad weather, multipathinterference induced by a wave reflected on a building, and the like.

-   Patent document 1: Japanese patent application publication No.    2001-309262.

DISCLOSURE OF THE INVENTION Problems the Invention is Going to Solve

On the other hand, stream data broadcasting directed to a mobilereception terminal is expected to become widely available as a means foreasily enjoying stream data such as audio and video any time andanywhere.

In the case of receiving stream data by a mobile reception terminal, themobile reception terminal may move to a place of a poor receptioncondition where it is difficult for a radio wave to penetrate, andtherefore a situation in which a correct transmission signal cannot beobtained for several seconds may frequently occur, unlike in the case ofreceiving stream data by a fixed reception terminal.

Such a situation may be unable to be dealt with by the above errorcorrection process that is intended for transmission troubles caused bybad weather, multipath, and the like, as a result of which the streamdata will end up being recorded in a partially missing state. Whenrecording and reproducing such stream data that is partially missing dueto a reception failure, the following problem arises with regard tosynchronization between a broadcasting system and a reception terminal.

Firstly, synchronization between a broadcasting system and a receptionterminal is described below, based on an example of using a MPEG2 TS(Transport Stream) of ISO/IEC 13818-1 that is a representativetransmission format for digital broadcasting.

In stream data which is broadcast from a broadcasting system, PCR(Program Clock Reference) information showing a reference time that isto be referenced at the time of reproduction is periodically embedded ina TS header. Also, a PTS (Presentation Time Stamp) showing apresentation time of an audio frame, a video frame, or subtitle data ona time axis that is synchronous with the time of the PCR information isembedded in a header of a PES (Packetized Elementary Stream) packetmultiplexed in the stream data. The PCR information and the PTS valueare set and broadcast by the broadcasting system.

On the other hand, a reception terminal includes a clock (hereaftercalled a time clock). When reproducing the stream data, the receptionterminal synchronizes the time clock with the PCR value and, when a time(hereafter called a STC (System Time Clock) value) shown by the timeclock reaches the PTS of the audio or video frame set in the streamdata, outputs the audio or video frame to a speaker or a monitor. Inthis way, audio and video are synchronously output from the receptionterminal with a timing intended by the broadcasting system.

A problem that occurs when recording and reproducing partially missingstream data is described next. FIG. 1 shows a change in STC value withtime, in the case where broadcast stream data cannot be receivedproperly and a part of the stream data is missing. In FIG. 1, ahorizontal axis represents a continuous time from a beginning of thebroadcast stream data, whereas a vertical axis represents the STC value.Also, black circles are plotted in FIG. 1 based on timings with whichPCRs are included in the stream data and values of these PCRs.

In FIG. 1, straight lines 101, 102, and 103 show the STC value. The STCvalue is not continuous at points A and E because, at these points A andE, the PCR information that is the basis of synchronization for the timeclock is set to a value different from a value which can be estimatedfrom a normal counting speed. Thus, the broadcasting system is capableof not only changing the PCR value at the normal counting speed but alsosetting the PCR value to an arbitrary value with an arbitrary timing. Inthis specification, a situation in which the PCR value becomes differentfrom a value that can be estimated from the normal counting speed isreferred to as “the PCR value is discontinuous”, and a situation inwhich the PCR value is set to a discontinuous value is referred to as“the PCR is reset”.

An invalid section 105 indicated by a diagonally shaded area is asection where a radio wave reception condition is poor and a TS packetcannot be got properly. In this section too, PCR reset is made by thebroadcasting system at a point C. However, since the reception terminalcannot properly get a TS packet including PCR information at the pointC, the reception terminal, when performing reproduction, keepsincreasing the STC value as shown by the straight line 102 withoutresetting the STC value at the point C. After this, the receptionterminal resets the STC value at the point E, based on PCR informationthat is got first after the radio wave reception condition recovers.This being so, the synchronization between the broadcasting system andthe reception terminal is lost during a period from the point C to thepoint E.

In the period from the point C to the point E during which the loss ofsynchronization occurs, the broadcasting system assumes that the STCmaintains synchronization as shown by a broken line 104, and accordinglysets a PTS of each frame so as to follow the broken line 104 andbroadcasts it. As a result, in a section 106 from a point D at which theradio wave reception condition recovers to the point E at which the PCRinformation is first got after the recovery, despite the fact that thestream data is received properly, the reception terminal abandons eachframe on the ground that its presentation time has already passed,because the STC value exceeds the PTS.

The effect of this problem is particularly serious when the broadcastingsystem intends to have an IDR (Instantaneous Decoder Refresh) picturedisplayed in this section 106 where the frame abandonment occurs.

The reason for this is given below. An IDR picture, which is a singlydecodable picture, appears in a stream with a longer interval, such as 2seconds in general and 5 seconds at the maximum, than PCR information.Accordingly, once an IDR picture is abandoned, even if PCR informationis got immediately after the abandonment of the IDR picture, allpictures such as a P picture and a B picture that are not decodablewithout the IDR picture as a reference source cannot be decoded forseveral seconds until the next IDR picture is got.

Generally, the PCR value is reset to be smaller than a value that can beestimated from the normal counting speed. However, it is also possibleto reset the PCR value to be larger than the value that can be estimatedfrom the normal counting speed. If the receiver fails to detect suchreset that increases the PCR value due to deterioration of the radiowave reception condition and the like, a PTS in stream data got afterthe radio wave reception condition recovers will exceed the STC valuegreatly, causing data to be output with a timing that differs from anoriginal output timing.

In view of the above problem, the present invention aims to provide astream data recording device which records stream data so that, evenwhen PCR information for resetting a PCR cannot be got due to partialmissing of stream data caused by deterioration in radio wave receptioncondition and the like, stream data properly got after recovery from themissing until getting of next PCR information can be reproduced with atiming intended by a broadcasting system. The present invention alsoaims to provide a stream data reproducing device that can, even when PCRinformation for resetting a PCR cannot be recorded due to partialmissing of stream data, reproduce stream data which is properly recordedafter recovery from the missing until getting of next PCR information,with a timing intended by a broadcasting system.

Means of Solving the Problems

The stated aim can be achieved by a stream data recording device thatrecords stream data including pieces of clock reference information, thestream data recording device including: a getting unit operable to getthe stream data; a time clock unit operable to count a timesynchronously with a time shown by each piece of clock referenceinformation; a detection unit operable to detect, in the got streamdata, an invalid section where a part of packets of the stream data ismissing; a generation unit operable to generate index information andtime correction information, the index information specifying a positionof an end of the invalid section in the stream data, and the timecorrection information being used for correcting the time of the timeclock unit at the end of the invalid section, to a state identical to ifthe time clock unit synchronizes with a time shown by a piece of clockreference information included in the invalid section; and a recordingunit operable to record the generated index information and timecorrection information in correspondence with the got stream data.

The stated aim can be achieved by a stream data reproducing device thatreads stream data including pieces of clock reference information from arecording medium and reproduces the stream data, the stream datareproducing device including: a reading unit operable to read the streamdata; a time clock unit operable to count a time synchronously with atime shown by each piece of clock reference information; an informationgetting unit operable to get index information and time correctioninformation from the recording medium on which the stream data, theindex information, and the time correction information are recorded, theindex information specifying a position, in the stream data, of aninvalid section where a part of the stream data was missing whenrecording the stream data, and the time correction information beingused for correcting the time of the time clock unit to a state identicalto if the time clock unit synchronizes with a time shown by a piece ofclock reference information included in the invalid section; a resettingunit operable to reset the time clock unit based on the time correctioninformation, when performing reproduction at the position specified bythe index information; and a reproduction control unit operable toreproduce a frame in the stream data at a predefined presentation time,based on the time of the time clock unit.

Effects of the Invention

According to the above construction, the stream data recording device towhich the present invention relates records, if missing occurs whenreceiving stream data, time correction information and index informationonto a recording medium together with the partially missing stream data,where the time correction information specifies a value of the timeclock unit in the case where the time clock unit synchronizes with PCRinformation included in the invalid section, and the index informationspecifies a position of the invalid section in the stream data.

When reproducing the recorded stream data, the stream data reproducingdevice to which the present invention relates can set the time clockunit to a time intended by a broadcasting system at a position where theinvalid section ends, by referencing the index information and the timecorrection information.

In this way, even when PCR information included in an invalid sectionindicates PCR reset, it is possible to synchronize the time clock unitwith a time intended by a broadcasting system, during a section fromrecovery from the missing to getting of next PCR information. As aresult, stream data got during this section can be reproduced with atiming intended by the broadcasting system.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a change in STC value with time, when broadcast stream datacannot be received properly and partial missing of stream data occurs.

FIG. 2 shows a form of use of a stream data recording device and astream data reproducing device according to the present invention.

FIG. 3 shows an example data structure of a TS.

FIG. 4 shows an example data structure of video data and audio dataincluded in a payload part of a TS packet.

FIG. 5 shows an internal construction of a stream data recording deviceaccording to an embodiment.

FIG. 6 shows a data structure of meta-information according to a firstembodiment.

FIG. 7 shows TS packets recorded when an invalid section occurs.

FIG. 8 is a flowchart showing a procedure of a stream data recordingprocess in a stream data recording device 5.

FIG. 9 shows a relation between a STC value and a PCR when PCR resetdoes not occur in an invalid section.

FIG. 10 is a flowchart of a process of detecting PCR reset using a timeoffset value.

FIG. 11 shows a relation between a STC value and a PCR when a pluralityof invalid sections occur.

FIG. 12 shows a relation between a TS and video frames.

FIG. 13 is a flowchart of a process of detecting PCR reset using anin-buffer holding time.

FIG. 14 is a flowchart showing a method of detecting PCR reset in aninvalid section that occurs after an invalid section in which PCR resetoccurs but a time offset value cannot be calculated.

FIG. 15 shows an internal construction of a stream data reproducingdevice 6 according to the embodiment.

FIG. 16 shows how a time clock unit 26 and a time clock unit 27 changewhen reproducing stream data in which PCR reset occurs in an invalidsection.

FIG. 17 shows a procedure of a stream data reproducing process in thestream data reproducing device 6 according to the embodiment.

FIG. 18 shows a data structure of meta-information according to a secondembodiment.

FIG. 19 shows an internal construction of a stream data recording device7 according to the second embodiment.

FIG. 20 is a flowchart showing a procedure of a stream data recordingprocess in the stream data recording device 7.

FIG. 21 shows how a time clock and a PTS included in stream data changewhen PCR reset does not occur in an invalid section.

FIG. 22 shows how a time clock and a PTS included in stream data change.

FIG. 23 is a flowchart showing a procedure of calculating a reproductionperiod by a reproduction period calculation unit 18.

FIG. 24 shows a relation between an audio frame and a PTS included in anaudio PES header.

FIG. 25 shows an internal construction of a stream data reproducingdevice 8 according to the second embodiment.

FIG. 26 shows a procedure of a stream data reproducing process in thestream data reproducing device 8 according to the second embodiment.

FIG. 27 shows a data structure of meta-information according to a thirdembodiment.

FIG. 28 shows an internal construction of a stream data reproducingdevice 9 according to the third embodiment.

FIG. 29A shows a screen display example of informing a user that anirreproducible section exists in recorded stream data.

FIG. 29B shows another screen display example of informing the user thatan irreproducible section exists.

FIG. 29C shows a screen display example of informing the user of a totalreproduction period at the time of timer recording and a reproducibleperiod of recorded stream data.

FIG. 29D shows a display example of informing of a section that can bespecified as a jump destination and a section that cannot be specifiedas a jump destination, when requesting to specify a jump destination.

FIG. 30A schematically shows a stream data reproducing device 3 thatdisplays an image showing a reproduction status.

FIG. 30B shows an example method of displaying an image showing areproduction status.

FIG. 31 shows a procedure of a stream data reproducing process in thestream data reproducing device 9 according to the third embodiment.

DESCRIPTION OF REFERENCE NUMERALS

-   -   1 . . . broadcasting system    -   2 . . . transmission antenna    -   3 . . . mobile reception terminal    -   4 . . . recording medium    -   5 . . . stream data recording device    -   6 . . . stream data reproducing device    -   7 . . . stream data recording device    -   8 . . . stream data reproducing device    -   9 . . . stream data reproducing device    -   10 . . . monitor    -   10 a . . . image output part    -   10 b . . . status display part    -   10 c . . . reproduction position display bar object    -   10 d . . . reproduction period display    -   10 e . . . section    -   10 f . . . section    -   10 g . . . section    -   10 h . . . pop-up    -   11 . . . getting unit    -   12 . . . packet analysis unit    -   13 . . . missing detection unit    -   14 . . . time clock unit    -   15 . . . reset detection unit    -   16 . . . meta-information generation unit    -   17 . . . recording control unit    -   18 . . . reproduction period calculation unit    -   19 . . . meta-information generation unit    -   21 . . . getting unit    -   22 . . . decoding unit    -   23 . . . output unit    -   24 . . . meta-information analysis unit    -   25 . . . time clock control unit    -   26 . . . time clock unit    -   27 . . . time clock unit    -   28 . . . decoding unit    -   29 . . . meta-information analysis unit    -   30 . . . time clock control unit    -   31 . . . decoding unit    -   32 . . . time clock control unit    -   33 . . . status display unit

BEST MODE FOR CARRYING OUT THE INVENTION

The following describes a best mode for carrying out the presentinvention, with reference to drawings.

First Embodiment System Overview

First, a form of use out of forms of implementing a stream datarecording device and a stream data reproducing device according to thepresent invention is described below. FIG. 2 shows a form of use of thestream data recording device and the stream data reproducing deviceaccording to the present invention. In FIG. 2, the stream data recordingdevice and the stream data reproducing device according to the presentinvention are included in a mobile reception terminal 3. The mobilereception terminal 3 is used to receive a broadcast wave that istransmitted from a broadcasting system 1 via a transmission antenna 2,get stream data from the received broadcast wave, and record the gotstream data onto a recording medium 4, and also used to read the streamdata recorded on the recording medium 4 and reproduce the read streamdata.

The broadcasting system 1 generates stream data of digital broadcasting.

The transmission antenna 2 transmits the stream data generated by thebroadcasting system 1 on a digital broadcasting radio wave.

The recording medium 4 is used for recording/holding data. Examples ofthe recording medium 4 include an optical disc, a magnetic disk, and asemiconductor memory.

This completes the description of the form of use of the stream datarecording device and the stream data reproducing device according to thepresent invention.

The following describes stream data that is subjected torecording/reproduction, in detail.

<Stream Data>

An ISO/IEC 13818-1 MPEG2 TS is a representative example of atransmission format used in digital broadcasting. This embodimentdescribes an example where a MPEG2 TS is used as stream data. FIG. 3shows an example data structure of the TS.

The first tier shows TS packets. In the TS, stream data of a pluralityof programs is divided into packets called TS packets for each of audiodata, video data, and subtitle data, and these TS packets aremultiplexed with each other and transmitted. A TS packet is made up of aheader part and a payload part, with audio data, video data, or subtitledata being stored in the TS payload.

The second tier shows the header of the TS packet. The header of each TSpacket includes an identifier called a PID (Packet Identifier) foridentifying the TS packet. TS packets storing audio data, video data,and subtitle data of each program have different identifiers dependingon the type of stored data.

Also, PCR information used for synchronization between the broadcastingsystem 1 which generates the stream data and the mobile receptionterminal 3 which receives the stream data and reproduces/records thestream data is embedded in a header of a TS packet to which a specificPID is assigned.

PIDs of TS packets in which PCR information is embedded and TS packetswhich store audio data, video data, and subtitle data of programs areshown by a PMT (Program Map Table). The mobile reception terminal 3identifies received TS packets using PIDs, to get TS packets of aprogram that is to be reproduced/recorded.

<Data Structure of a TS Payload>

Payload parts of TS packets store various types of stream data thatconstitute a program including audio data and video data compressedaccording to standards such as ISO/IEC 13818-7 MPEG2 AAC (Advanced AudioCoding) and ISO/IEC 14496-10 MPEG4 AVC (Advanced Video Coding) andsubtitle data in 8-unit character code specified by ARIB STD-B8, ARIBSTD-B24, or the like, information showing a program structure such as aPMT, and the like. Hereafter, each element constituting a program, suchas audio, video, and subtitles, is collectively referred to as a“component”.

FIG. 4 shows an example data structure of video data and audio dataincluded in payload parts of TS packets.

In FIG. 4, the fourth tier shows a TS. The third tier shows PES packetsof video data, while the fifth tier shows PES packets of audio data. APES packet can be stored within one TS payload or over a plurality of TSpayloads.

Each PES packet is composed of a header part and a payload part. Aheader part of a PES packet includes a PTS showing a presentation timeat which data stored in a payload part is to be output to a monitor or aspeaker. A value of the PTS is set by the broadcasting system 1 on anassumption that each component will be synchronously output byreferencing a STC value of the mobile reception terminal 3 which iscorrected according to PCR information. Therefore, when PCR resetoccurs, a PTS of a component included in subsequently transmitted streamdata is set to a value that is discontinuous from a preceding frame.

An ES (Elementary Stream) is formed by connecting PES payloads.

The second tier shows a video ES. The ES is compressed data. In the caseof a MPEG standard such as MPEG4 AVC, a video ES is composed of an IDRpicture that can be decoded singly, a P picture that requires precedingpicture data, and a B picture that requires preceding/succeeding picturedata. Each IDR picture is stored in a PES packet so as to be located ata beginning of a payload part.

The first tier shows video frames. The video frames are obtained bydecoding the compressed video ES.

This completes the detailed description of the stream data.

<Stream Data Recording Device>

The following describes the mobile reception terminal 3 according to anembodiment, in detail. First, a construction for recording stream datain the mobile reception terminal 3 is described below. A stream datarecording function is realized by a stream data recording device 5included in the mobile reception terminal 3. FIG. 5 shows an internalconstruction of the stream data recording device 5.

The stream data recording device 5 includes a getting unit 11, a packetanalysis unit 12, a missing detection unit 13, a time clock unit 14, areset detection unit 15, a meta-information generation unit 16, and arecording control unit 17.

The getting unit 11 receives a broadcast wave transmitted from thetransmission antenna 2 shown in FIG. 2 in an antenna module, and outputsa TS transmitted via the broadcast wave to the packet analysis unit 12.Also, when a decrease and recovery of a C/N level or a loss and recoveryof RF synchronization are detected in the antenna module, the gettingunit 11 notifies the packet analysis unit 12 of the detection.Hereafter, detection of a decrease of a C/N level or a loss of RFsynchronization in the antenna module is referred to as a “datareception failure start”, and detection of recovery of a C/N level orrecovery of RF synchronization is referred to as a “data receptionfailure end”.

The packet analysis unit 12 gets a TS packet including a recordingtarget PID by analyzing a TS header, and outputs the TS packet to themissing detection unit 13, based on an instruction from a user. Here, ifPCR information relating to a recording target program is included inthe TS header, the packet analysis unit 12 extracts the PCR informationand outputs it to the time clock unit 14. During a period from when adata reception failure start is notified to when a data receptionfailure end is notified by the getting unit 11, however, the packetanalysis unit 12 abandons a TS packet without analyzing a header, andtransfers the notification of the data reception failure start and thedata reception failure end to the missing detection unit 13. Also, whenunable to properly analyze a TS header due to a reason such as data of aTS packet containing errors that cannot be corrected by an errorcorrection process, the packet analysis unit 12 generates the samenotification as the notification of the data reception failure start andthe data reception failure end by the getting unit 11, and transfers thegenerated notification to the missing detection unit 13.

The missing detection unit 13 detects whether or not an invalid sectionthat is not subjected to reproduction occurs in received stream data,and notifies the reset detection unit 15 and the meta-informationgeneration unit 16 of a result of the detection. The invalid sectionoccurs, for example, when a radio wave reception condition deterioratesduring stream data recording and a recording target TS packet cannot begot properly.

When no invalid section is detected, the missing detection unit 13outputs a TS packet got from the packet analysis unit 12 to therecording control unit 17. When an invalid section is detected, themissing detection unit 13 outputs a discontinuous packet indicating thata packet preceding the discontinuous packet and a packet succeeding thediscontinuous packet are not continuous with each other, to therecording control unit 17.

The missing detection unit 13 detects an invalid section according toone of the following methods 1) to 3).

1) A method of detecting a period from when a data reception failurestart is notified to when a data reception failure end is notified, asan invalid section.

2) A method of detecting a loss of continuity between packets, byanalyzing TS packets which have been got at the time of judgment.

3) A method of detecting a case where information, such as PCRinformation, that is cyclically included in a TS (hereafter called“cyclically transmitted information”) is not detected over a maximumtransmission cycle from when detected in a previously got TS packet.

As specific examples of the above method 2), a loss of continuitybetween packets can be detected in cases such as the following 2-1) and2-2).

2-1) A missing number occurs in values of a continuity_counter that areserially assigned to TS packets storing components.

2-2) There is no PCR reset in a TS packet got at the time of judgment,despite the fact that a discontinuity_indicator is valid in animmediately preceding TS packet having the same PID.

The discontinuity_indicator is information which is set in an adaptationfield of a TS packet. When the discontinuity_indicator is valid, itindicates that PCR reset occurs in a succeeding TS packet having thesame PID.

To detect an invalid section according to the above method 3), themissing detection unit 13 holds a STC value got from the time clock unit14 at the time when the cyclically transmitted information is lastdetected, in its internal storage area. The missing detection unit 13compares a STC value of the time clock unit 14 with the STC value heldin the internal storage area, and detects an invalid section when adifference between the two STC values exceeds the maximum transmissioncycle of the cyclically transmitted information. Alternatively, themissing detection unit 13 may get a STC value upon detecting newestcyclically transmitted information, calculate a difference between thegot STC value and the STC value got when detecting the precedingcyclically transmitted information and held in the internal storagearea, and judge that an invalid section has occurred if the differenceexceeds the maximum transmission cycle of the cyclically transmittedinformation.

The cyclically transmitted information used for detecting an invalidsection is not limited to PCR information. Any information whose maximumtransmission cycle of being included in stream data has been set, e.g. aPAT, a PMT, a NIT, a TOT, a TDT, an EIT, and a PTS which is included instream data for reproduction, is equally applicable.

The time clock unit 14 has an internal clock, and synchronizes theinternal clock to a PCR value by referencing PCR information got fromthe packet analysis unit 12. A value (a STC value) of the internal clockin the time clock unit 14 is referenced by the missing detection unit13, the reset detection unit 15, and the meta-information generationunit 16. Also, each time the time clock unit 14 gets PCR informationfrom the packet analysis unit 12, the time clock unit 14 notifies themeta-information generation unit 16 of the getting of the PCRinformation.

The reset detection unit 15 gets a result of detecting an invalidsection from the missing detection unit 13, performs a process ofdetecting whether or not PCR reset occurred in the invalid section byreferencing the STC value of the time clock unit 14, and notifies aresult of the detection to the meta-information generation unit 16.

The meta-information generation unit 16 generates meta-information basedon the detection results of the missing detection unit 13 and the resetdetection unit 15. The meta-information is data that shows a structureand an attribute of the stream data.

FIG. 6 shows a data structure of meta-information in this embodiment.The meta-information in this embodiment is made up of a same number ofrecords as invalid sections detected in the stream data, where eachrecord is composed of a “missing start time”, a “missing end time”,“discontinuity point index information”, and a “time offset value”.

The “missing start time” is a STC value when an invalid section occurs.An invalid section start time 111 shown in FIG. 1 corresponds to this.

The “missing end time” is a STC value when the invalid section ends. Aninvalid section end time 112 shown in FIG. 1 corresponds to this.

The “discontinuity point index information” is a data position of a TSpacket from which recording is resumed after the invalid section ends. Adata position of a packet that is recorded first after the point D inFIG. 1 corresponds to this. A serial number starting from a top packetof a recording target TS, an offset value from a file beginning, or thelike can be used as data index information. An offset value from a filebeginning is used in this embodiment.

The “time offset value” is a difference between a STC value and a PCRvalue when getting of PCR information is notified first after theinvalid section ends. A time offset value 113 in FIG. 1 corresponds tothis.

The recording control unit 17 in FIG. 5 records stream data output fromthe missing detection unit 13 while no invalid section is detected, andmeta-information generated by the meta-information generation unit 16,onto the recording medium 4 in correspondence with each other. Since adiscontinuous packet is output from the missing detection unit 13 whenan invalid section is detected, the stream data recorded by therecording control unit 17 has the discontinuous packet inserted at aposition where a TS packet is missing due to the occurrence of theinvalid section, as shown in FIG. 7.

This completes the description of the construction of the stream datarecording device.

<Stream Data Recording Method>

The following describes an operational procedure of the stream datarecording device 5.

FIG. 8 shows a procedure of a stream data recording process in thestream data recording device 5 according to this embodiment. Theprocedure shown in FIG. 8 is executed upon receiving a recordinginstruction from the user, and can be divided into the following fourmain steps 1 to 4.

1. A step of detecting an occurrence of an invalid section and getting amissing start time (steps S101-S105).

2. A step of detecting the end of the invalid section and getting amissing end time and discontinuity point index information (stepsS106-S109).

3. A step of detecting PCR reset that occurred in the invalid sectionand getting a time offset value (steps S110-S112).

4. A step of recording generated meta-information (steps S113-S114).

Steps S101-S105 for detecting an occurrence of an invalid section inrecorded stream data are described first.

When a recording process is launched in response to a recordinginstruction from the user, a TS packet having a recording target PID isgot as a result of reception of a broadcast wave by the getting unit 11and filtering by the packet analysis unit 12 (step S101). In step S102,the missing detection unit 13 judges whether or not missing occurs inrecording target TS packets got by the packet analysis unit 12. In thisTS packet missing detection process, one of the following methods 1) to3) is employed.

1) A method of detecting a period from when a data reception failurestart is notified to when a data reception failure end is notified bythe getting unit 11 or the packet analysis unit 12, as an invalidsection.

2) A method of detecting discontinuity of data included in packets, byanalyzing TS packets that have been got at the time of judgment.

3) A method of detecting a case where the cyclically transmittedinformation is not detected over the maximum transmission cycle fromwhen the cyclically transmitted information was last detected in apreviously got TS packet.

When TS packet missing is detected in the missing detection process(step S103: YES), the missing detection unit 13 judges whether thedetected point is a start point of an invalid section or a point withinan invalid section (step S104). The judgment as to whether or not thedetected point is the start point of the invalid section can be made by,for example, using a flag held in the internal storage area of themissing detection unit 13. The missing detection unit 13 sets the flagON when judging that the detected point is a start point of an invalidsection, and OFF when judging that the detected point is an endpoint ofan invalid section. In step S104, when the missing is detected, themissing detection unit 13 judges that the detected point is a startpoint of an invalid section if the flag is OFF, and judges that thedetected point is a point within an invalid section if the flag is ON.

When the detected point is a start point of an invalid section (stepS104: YES), the missing detection unit 13 notifies the meta-informationgeneration unit 16 of the start of the invalid section. Themeta-information generation unit 16 gets a STC value from the time clockunit 14 upon receiving the notification, and holds the STC value as“missing start time” information of meta-information (step S105). Thoughnot shown in the flowchart, a clock speed in the time clock unit 14 iscontrolled so as to synchronize with PCRs included in TS headers.

When the detected point is not the start point of the invalid sectionbut a point within the invalid section (step S104: NO), the missingdetection unit 13 and the meta-information generation unit 16 do notperform any process.

Next, the end of the invalid section is detected, and a missing end timeand discontinuity point index information are got (steps S106-S109).

When no TS packet missing is detected by the missing detection unit 13(step S103: NO), the recording control unit 17 gets a TS packet from themissing detection unit 13, and records the TS packet onto the recordingmedium 4 (step S106). Here, instead of recording one TS packet at atime, the recording control unit 17 may record, when data of apredetermined size is accumulated, the accumulated data onto therecording medium 4. Also, the TS packet recording may be performed witha different timing, so long as it is between steps S106 and S113.

The missing detection unit 13 judges whether or not a properly receivedTS packet is at an end point of the invalid section (step S107). Thisjudgment of step S107 can be made by using the flag held in the missingdetection unit 13, as in the judgment of step S104. Since the missingdetection unit 13 sets the flag ON when judging that the detected pointis a start point of an invalid section, and OFF when judging that thedetected point is an end point of an invalid section, if the flag is ONwhen a TS packet is properly received, the missing detection unit 13 canjudge that the properly received TS packet is at the end point of theinvalid section.

When the properly received TS packet is at the end point of the invalidsection as a result of the judgment of step S107 (step S107: YES), themissing detection unit 13 notifies the meta-information generation unit16 of the end of the invalid section. The meta-information generationunit 16 gets a STC value from the time clock unit 14 upon receiving thenotification, and holds the STC value as “missing end time” informationof the meta-information (step S108). Also, the meta-informationgeneration unit 16 gets recording index information of the TS packetfrom the recording control unit 17, and holds the recording indexinformation as “discontinuity point index information” of themeta-information (step S109). A number that begins at a top one ofrecording target TS packets, an offset value from a file beginning, orthe like can be used as the recording index information of the TSpacket. If the properly received TS packet is not at the end point ofthe invalid section as a result of the judgment of step S107 (step S107:NO), steps S108 and S109 are not performed.

Next, PCR reset is detected, and a time offset value is got (stepsS110-S112).

In step S110, the reset detection unit 15 executes a reset detectionprocess of judging whether or not PCR reset occurred in the invalidsection. The reset detection process will be described in detail later.If the PCR reset occurred in the invalid section (step S111: YES), thereset detection unit 15 notifies the meta-information generation unit 16of a result of detecting the occurrence of the PCR reset, and outputs atime offset value. The meta-information generation unit 16 gets the timeoffset value from the reset detection unit 15, and holds the time offsetvalue as a “time offset value” of the meta-information (step S112). Ifno PCR reset occurred in the invalid section (step S111: NO), step S112is not performed.

Lastly, the generated meta-information is recorded at the end of the TSrecording (steps S113-S114).

The recording control unit 17 judges whether or not a recording endinstruction, such as a recording end instruction made by the user or arecording end instruction according to a recording end time, is issued(step S113). When a recording end instruction is issued (step S113:YES), the recording control unit 17 gets the meta-information from themeta-information generation unit 16, and records the meta-informationonto the recording medium 4 (step S114). If no recording end instructionis issued (step S113: NO), the procedure returns to step S101 to processa next TS packet.

This completes the description of the operational procedure of thestream data recording device 5.

This embodiment describes the case where the meta-information is writtenonto the recording medium all at once at the end of the stream datarecording, in step S114. Instead, the meta-information may be recordedonto the recording medium one record at a time. For instance, ifinformation for one record has already been generated when judgingwhether or not a recording end instruction is issued in step S113, theinformation for one record held in the meta-information generation unit16 may be output to the recording control unit 17 and written onto therecording medium. Alternatively, a meta-information recording area maybe secured on the recording medium upon starting the stream datarecording so that, each time element information of meta-information isgot in each of steps S105, S108, S109, and S112, the got elementinformation is output to the recording control unit 17 and written intothe meta-information recording area.

<PCR Reset Detection Method>

The three methods of judging whether or not PCR reset occurred in aninvalid section in step S110 in FIG. 8 are described in detail below.

The method of using a time offset value is described first.

FIG. 9 shows a change in STC value with time, when no PCR reset occurredin an invalid section. In FIG. 9, a horizontal axis shows a continuoustime from the beginning of stream data that is broadcast, and a verticalaxis shows a STC value. A diagonally shaded area 121 shows an invalidsection in the stream data. A black circle shows PCR time informationincluded in a TS header. A straight line 122 shows a state of countingby the time clock unit 14. A broken line 124 shows a continuous value ofa PCR included in a TS header until PCR information is first got afterthe invalid section ends. A time offset value 127 shows a differencebetween the straight line 122 and the broken line 124.

A case where PCR reset occurred in the invalid section is explainedbelow, with reference to FIG. 1. Originally, if the time clock countsbased on the PCR included in the TS header, the counting state is asshown by the broken line 104 in FIG. 1, creating a difference, i.e. thetime offset value 113, from the STC value of the time clock unit 14shown by the straight line 102. On the other hand, in a case where noPCR reset occurred in the invalid section, the counting state of thetime clock based on the PCR included in the TS header is as shown in thebroken line 124, creating no difference from the STC value of the timeclock unit 14 shown by the straight line 122. Which is to say, if PCRreset occurred in the invalid section, the time offset value is large(113 in FIG. 1), and if no PCR reset occurred in the invalid section,the time offset value is small (127 in FIG. 9).

A PCR reset detection process which utilizes this feature that a timeoffset value is caused by PCR reset in an invalid section is describedbelow, with reference to FIG. 10. FIG. 10 is a flowchart of a process ofdetecting PCR reset using a time offset value.

The packet analysis unit 12 analyzes a header of an got TS packet, andchecks whether or not PCR information is included in the header (stepS131). If no PCR information is included (step S131: NO), the procedureof the PCR reset detection process shown in this flowchart ends. If PCRinformation is included in the header (step S131: YES), the packetanalysis unit 12 notifies the reset detection unit 15 of the presence ofthe PCR information via the time clock unit 14, and the reset detectionunit 15 gets the PCR information (step S132). Also, the reset detectionunit 15 gets a STC value before being synchronized with the PCRinformation, from the time clock unit 14 (step S133). The resetdetection unit 15 compares the STC value of the time clock unit 14 withthe PCR value, and calculates a time offset value (step S134).

If the STC value is larger than the PCR value (step S135: YES), thereset detection unit 15 judges that PCR reset occurred, and notifies themeta-information generation unit 16 of the calculated time offset value(step S136). If the STC value is no larger than the PCR value (stepS135: NO), the reset detection unit 15 judges whether or not the timeoffset value is no smaller than a threshold value TH1. If the timeoffset value is no smaller than the threshold value TH1 (step S137:YES), the reset detection unit 15 judges that PCR reset occurred, andnotifies the meta-information generation unit 16 of the calculated timeoffset value (step S136).

If the STC value is no larger than the PCR value and also the timeoffset value is smaller than the threshold value TH1 (step S135: NO,step S137: NO), the reset detection unit 15 judges that no PCR resetoccurred, notifies the meta-information generation unit 16 of “0” as atime offset value (step S138), and ends the procedure of the PCR resetdetection process shown in this flowchart.

This completes the description of the procedure of the PCR resetdetection process which utilizes the feature that a time offset valueoccurs as a result of missing of PCR reset. According to the aboveprocedure, it is possible to detect not only a simple case where PCRreset occurs in an invalid section, but also a phenomenon in which, whena PMT in an invalid section indicates to change a PID of a TS packetincluding PCR information, the change of the PID is unable to be madedue to missing of this PMT and as a result a difference emerges betweenthe STC value and the PCR value.

Though the judgment of step S135 uses a judgment condition “whether ornot the STC value is larger than the PCR value”, the judgment of stepS135 may instead use a judgment condition “whether or not a sum of theSTC value and the PCR information transmission cycle is larger than thePCR value”.

The following describes how to deal with a case when a plurality ofinvalid sections occur in a short period of time. FIG. 11 shows arelation between the STC value and the PCR when a plurality of invalidsections occur. In FIG. 11, a horizontal axis shows a continuous timefrom when the stream data reception starts, and a vertical axis showsthe STC value. A diagonally shaded area 131 and a diagonally shaded area132 respectively show an invalid section A5 and an invalid section B5 inwhich the radio wave reception condition deteriorates and a TS packet tobe recorded is missing. A black circle shows PCR time informationincluded in a TS header. Straight lines 133 and 134 show a countingstate of the time clock unit 14. A broken line 135 shows a continuousPCR value included in a TS header until PCR information is first gotafter the invalid section B5 ends. A time offset value 136 shows adifference between the straight line 133 and the broken line 135. Apoint E5 is a start point of the invalid section A5, whilst a point F5is an end point of the invalid section B5. A section C5 shows a sectionin which stream data between the invalid sections A5 and B5 is properlyreceived. No PCR information is included in the stream data of thesection C5. A section D5 shows a section in which stream data isproperly received after the invalid section B5. A PCR is included in thestream data of the section D5.

In a situation where no PCR information is present between the end ofthe invalid section and the next invalid section (as in the case of thesection C5 in FIG. 11), the operation exits from the procedure of FIG.10 at step S131. This makes it impossible to calculate a time offsetvalue, so that the judgment as to whether PCR reset occurred in theinvalid section A5 in FIG. 11 cannot be performed. This being so, thesection C5 in FIG. 11 cannot be reproduced with a timing intended by thebroadcasting system.

In view of this, if no PCR information is present until the next invalidsection, the invalid section A5 and the invalid section B5 in FIG. 11are combined to treat a section from E5 to F5 as one invalid section,and meta-information is generated for this combined invalid section.

This process can be realized in the following manner. In the procedureshown in FIG. 8, the meta-information generation unit 16 does notperform step S105 for the succeeding invalid section (the invalidsection B5 in FIG. 11) and, in steps S108 and S109 for the succeedinginvalid section (the invalid section B5 in FIG. 11), rewrites a “missingend time” and “discontinuity point index information” ofmeta-information corresponding to the invalid section (the invalidsection A5 in FIG. 11) whose time offset value cannot be calculated, toa “missing end time” and “discontinuity point index information”corresponding to the succeeding invalid section (the invalid section B5in FIG. 11).

The second method of judging whether or not PCR reset occurred in aninvalid section, which uses time information from reception to output ofvideo data, is described below.

To prevent a buffer overflow or a buffer underflow, a buffer size, adata holding time in a buffer, and the like are prescribed as a virtualmodel in a standard. As one example, the “Operational Guidelines forDigital Terrestrial Television Broadcasting” stipulated by theAssociation of Radio Industries and Businesses (ARIB TR B-14) specifythat stream data input in a CPB (Coded Picture Buffer) for holding videostream data is decoded and output within 1.5 second. The CPB is a bufferof a virtual model defined by ISO/IEC 14496-10 MPEG4 AVC.

FIG. 12 shows a relation between a TS and video frames. The first tiershows a recorded TS, and the second tier shows video frames obtained bydecoding video data included in the TS. An in-buffer holding time showsa time period from when TS data is received to when video data isdecoded and output. For example, in the case of the “OperationalGuidelines for Digital Terrestrial Television Broadcasting”, the dataholding time of the CPB is within 1.5 second, and so the in-bufferholding time can be estimated to be within (1.5+α) second. Here, α is atime period from when TS data is received to when a decoding process isstarted, and is dependent on the stream data recording device. If no PCRreset occurred in an invalid section, a difference between a PTSincluded in a PES header and a time point (STC value) of receiving TSdata is within this in-buffer holding time. If PCR reset occurred in aninvalid section, on the other hand, the difference exceeds the in-bufferholding time.

A PCR reset detection process which utilizes this feature that adifference between a STC value at the time of receiving TS data and aPTS included in a PES header exceeds an in-buffer holding time due toPCR reset in an invalid section is described below, with reference toFIG. 13. FIG. 13 is a flowchart of a process of detecting PCR reset byusing an in-buffer holding time.

The packet analysis unit 12 analyzes a payload part of an got TS packet,and checks whether or not a PTS is included in a PES header (step S151).If the PTS is not included (step S151: NO), the procedure of the PCRreset detection process shown in this flowchart ends. If the PTS isincluded (step S151: YES), the packet analysis unit 12 notifies thepresence of the PTS to the reset detection unit 15, and the resetdetection unit 15 responsively gets the PTS (step S152). Also, the resetdetection unit 15 gets a STC value at that time from the time clock unit14 (step S153). The reset detection unit 15 compares the PTS and the STCvalue got from the time clock unit 14, and calculates an in-bufferholding time of a frame to which the PTS is given (step S154).

When the calculated in-buffer holding time is larger than a thresholdvalue TH2 that is based on a data holding time of a buffer specified ina digital broadcasting standard (step S155: YES), the reset detectionunit 15 judges that PCR reset occurred, and notifies themeta-information generation unit 16 of the occurrence of the PCR reset(step S156). Here, though not shown in FIG. 13, the reset detection unit15 performs steps S131-S134 in FIG. 10 to calculate a time offset value,and notifies the time offset value to the meta-information generationunit 16. When the in-buffer holding time is no larger than the thresholdvalue TH2 (step S155: NO), the reset detection unit 15 judges that noPCR reset occurred, notifies the meta-information generation unit 16 of“0” as a time offset value (step S157), and ends the procedure of thePCR reset detection process shown in this flowchart.

According to this second method, the detection as to whether PCR resetoccurred in an invalid section is performed by using a PTS included instream data that follows the invalid section. This makes it possible todetect an occurrence of PCR reset even in the case where no PCRinformation is included between the end of one invalid section to thestart of the next invalid section as in the case of the section C5 inFIG. 11. If no PCR reset occurred, the section C5 can be reproduced witha timing intended by the broadcasting system. If PCR reset occurred,since a time offset value in the section C5 in FIG. 11 cannot becalculated, the invalid section A5 and the invalid section B5 in FIG. 11are combined and meta-information for one invalid section from the pointE5 to the point F5 is generated, as in the first method.

Though the PCR reset detection method using video data is describedabove, other components such as audio data may be used instead of videodata.

The third method of judging whether or not PCR reset occurred in aninvalid section is described below. This method deals with a case when,in the second method, no PCR information is included in a section inwhich stream data is properly received.

In FIG. 11, the PCR reset detection method for the invalid section A5 issimilar to the second method whose procedure is shown in FIG. 13. Thedifference from the second method is the following. In step S154 in FIG.13, the value of comparison between the PTS value and the STC value isheld as an in-buffer holding time of the invalid section A5. Also, instep S156, if no time offset value is calculated, the meta-informationgeneration unit 16 sets a value indicating that the time offset valuecannot be calculated yet (e.g. “−1”), as a “time offset value” ofmeta-information corresponding to the invalid section A5.

The PCR reset detection method for the invalid section B5 is describedbelow, with reference to a drawing.

FIG. 14 is a flowchart showing a method of detecting PCR reset for aninvalid section that occurs after an invalid section in which PCR resetoccurred but a time offset value could not be calculated. The invalidsections A5 and B5 and the sections C5 and D5 in the flowchart of FIG.14 correspond to those shown in FIG. 11.

In the procedure shown in FIG. 14, an in-buffer holding time of thesection D5 is calculated first (step S171). This can be done accordingto the same procedure as steps S151-S154 in FIG. 13. After this, adifference from a held in-buffer holding time of the section C5 iscalculated (step S172). If this difference is no larger than a thresholdvalue TH3 (step S173: YES), a time offset value of the section D5 iscalculated (step S174). In this case, it can be judged that a timeoffset value of the section C5 and the time offset value of the sectionD5 are the same. This being so, the reset detection unit 15 notifies themeta-information generation unit 16 of this time offset value as a timeoffset value of the invalid section A5 (step S175). Also, the resetdetection unit 15 notifies the meta-information generation unit 16 of“0” as a time offset value of the invalid section B5, on the ground thatno PCR reset occurred in the invalid section B5.

In the judgment of step S173, if the difference in in-buffer holdingtime between the section C5 and the section D5 is larger than thethreshold value TH3 (step S173: NO), it means PCR reset occurred in boththe invalid section A5 and the invalid section B5. In such a case, it isimpossible to calculate a time offset value of the section C5, so thatthe meta-information generation unit 16 performs a process of combiningthe invalid section A5 and the invalid section B5 (step S177).

The selection as to whether the process of FIG. 13 or the process ofFIG. 14 is executed as the PCR reset detection method can be made byholding an identification flag in the reset detection unit 15. Forinstance, the flag is set to ON if a start of a next invalid section isdetected while a time offset value is unable to be calculated, and setto OFF in step S173 in FIG. 14. This flag is referenced when startingthe PCR reset detection process. If the flag is ON, the process of FIG.14 is executed. If the flag is OFF, the process of FIG. 13 is executed.

This completes the description of the stream data recording device 5that achieves the stream data recording function in the mobile receptionterminal 3.

<Stream Data Reproducing Device>

The following describes a construction of reproducing recorded streamdata in the mobile reception terminal 3, in detail.

A stream data reproducing function is realized by a stream datareproducing device 6 included in the mobile reception terminal 3. FIG.15 shows an internal construction of the stream data reproducing device6 according to this embodiment.

In FIG. 15, stream data and meta-information recorded by the stream datarecording device 5 are held on the recording medium 4.

As shown in FIG. 15, the stream data reproducing device 6 includes agetting unit 21, a decoding unit 22, an output unit 23, ameta-information analysis unit 24, a time clock control unit 25, a timeclock unit 26, and a time clock unit 27.

The getting unit 21, based on an instruction from the user, getsmeta-information and stream data from the recording medium 4, andoutputs the stream data to the decoding unit 22 and the meta-informationto the meta-information analysis unit 24.

The decoding unit 22 gets the stream data from the getting unit 21, andperforms a decoding process on the got stream data to generate videodata, audio data, subtitle data, or the like. The decoding unit 22 thenreferences one of the time clock unit 26 and the time clock unit 27, andoutputs decoded data of each component, such as audio or video, to theoutput unit 23 with a timing at which a PTS of the component matches aSTC value of the reference target. The STC value reference target isswitched between the time clock unit 26 and the time clock unit 27, whena reproducing process reaches a stream data position notified by themeta-information analysis unit 24. Also, when PCR information is gotfrom the stream data, the decoding unit 22 notifies the time clockcontrol unit 25 of a PCR value.

The output unit 23 outputs a video signal and an audio signal got fromthe decoding unit 22, to a display, a speaker, and the like.

The meta-information analysis unit 24 analyzes the meta-information gotfrom the getting unit 21, and notifies the time clock control unit 25 ofa “time offset value” and a “missing end time”, in order to reset a STCvalue. Also, the meta-information analysis unit 24 notifies the decodingunit 22 of a stream data position at which the reference target timeclock is to be switched, based on “discontinuity point indexinformation” of the meta-information.

The time clock control unit 25 synchronizes one of the time clock unit26 and the time clock unit 27 that is referenced by the decoding unit22, with the PCR value notified from the decoding unit 22. The timeclock control unit 25 also resets one of the time clock unit 26 and thetime clock unit 27 that is not referenced by the decoding unit 22, usingthe time offset value got from the meta-information analysis unit 24.The reset of the time clock using the time offset value is performedwith a timing at which the STC value of the time clock referenced by thedecoding unit 22 reaches the “missing end time” of the meta-information.

The time clock unit 26 and the time clock unit 27 each serve as a clockthat is referenced by the decoding unit 22 in order to output the videosignal, the audio signal, and the like generated by the decoding unit 22with an appropriate timing.

This completes the description of the internal construction of thestream data reproducing device 6.

<Time Clock Switching>

The following describes the switching of the time clock whose STC valueis referenced by the decoding unit 22.

FIG. 16 shows a state of change in the time clock unit 26 and the timeclock unit 27, when reproducing stream data in which PCR reset occurredin an invalid section. A horizontal axis of a graph shows a continuoustime from when the reproduction of the stream data starts. A verticalaxis of the graph shows a clock value of a time clock. A diagonallyshaded area 141 shows an invalid section. A black circle shows PCR timeinformation included in a TS header. A straight line 142 shows acounting state of the time clock unit 26, and a broken line 143 shows acounting state of the time clock unit 27. A time offset value 146 showsa difference between the time clock unit 26 and the time clock unit 27.

An arrow of each of the time clock units 26 and 27 under the graphindicates a range in which a clock value of the time clock unit takes avalid value. A point A6 shows a timing with which the time clock unit 27is reset, and a point B6 shows a timing with which the time clockreferenced by the decoding unit 22 is switched from the time clock unit26 to the time clock unit 27.

When PCR reset occurred in an invalid section, it is necessary toresynchronize a time clock in accordance with the reset PCR, after theinvalid section ends.

In stream data reproduction, stream data is not reproduced with a timingof being read from a recording medium, as it takes time from when thestream data is read to when it is decoded and output. This being so,there is a case where an output time of stream data read before theoccurrence of the invalid section comes after the end of the invalidsection. In such a case, since a PTS of the stream data received beforethe occurrence of the invalid section has been set based on a PCR thatprecedes the occurrence of the PCR reset, if the time clock is broughtinto synchronization with a PCR value reset in the invalid sectionimmediately after the end of the invalid section, the correspondencebetween the PTS and the time clock is lost. In view of this, the twotime clocks are provided, where the time clock unit 27 is synchronizedwith the PCR value reset in the invalid section with a timing of the endof the invalid section (A6 in FIG. 16), but the reference target of thedecoding unit 22 is switched to the time clock unit 27 after the outputof all stream data received before the occurrence of the invalid sectionis completed (B6 in FIG. 16).

<Stream Data Reproducing Method>

The following describes an operational procedure of the stream datareproducing device 6 getting stream data from the recording medium 4 andreproducing the stream data. FIG. 17 shows a procedure of a stream datareproducing process in the stream data reproducing device 6 according tothis embodiment.

When a reproducing process is launched in accordance with an instructionfrom the user, the getting unit 21 reads meta-information from therecording medium 4 and outputs the meta-information to themeta-information analysis unit 24 (step S201). The meta-informationanalysis unit 24 selects, among records registered in themeta-information, a record whose “discontinuity point index information”relates to a nearest invalid section after a current stream datareproduction position (step S202), and outputs the selected record tothe decoding unit 22 (step S203).

The decoding unit 22 receives reproduction target stream data read fromthe recording medium 4 by the getting unit 21 and index information ofthe got part relative to a file beginning (step S204), and compares theindex information from the file beginning with the “discontinuity pointindex information” of the meta-information got from the meta-informationanalysis unit 24, to judge whether or not the stream data to beprocessed for reproduction is discontinuous from the preceding data(step S205).

If the stream data to be processed is not discontinuous from thepreceding data (step S206: NO), the decoding unit 22 performs a decodingprocess to generate video data, audio data, and subtitle data. Afterthis, the decoding unit 22 outputs decoded data of each component to theoutput unit 23, with a timing at which a PTS of the component matchesthe referenced time clock (step S215).

If the stream data to be processed is discontinuous from the precedingdata (step S206: YES), the decoding unit 22 references a “time offsetvalue” of the meta-information. When the referenced time offset value is“0” (step S207: YES), no PCR reset occurred in the invalid section andso it is unnecessary to reset the time clock. Accordingly, step S215 isexecuted to reproduce and output the stream data.

When the referenced time offset value is not “0” (step S207: NO), PCRreset occurred in the invalid section and so it is necessary to resetthe time clock value. Accordingly, the decoding unit 22 notifies themeta-information analysis unit 24 that the stream data to be processedreaches the position that is discontinuous from the preceding data. Uponbeing notified, the meta-information analysis unit 24 notifies the timeclock control unit 25 of the “time offset value” of the record selectedin step S202 (step S208).

Following the discontinuity point position reach notification to themeta-information analysis unit 24, the decoding unit 22 compares theclock value of the currently referenced time clock unit with a “missingend time” of the meta-information (step S209). If they do not match(step S210: NO), it means the current time is still a timing ofprocessing data preceding the discontinuity point, so that step S215 isexecuted to reproduce and output the data preceding the discontinuitypoint.

If the missing end time matches the clock value of the time clock unit(step S210: YES), the decoding unit 22 notifies the time clock controlunit 25 which of the time clock unit 26 and the time clock unit 27 thedecoding unit 22 currently references. Upon being notified, the timeclock control unit 25 sets the time clock not referenced by the decodingunit 22, to a value obtained by subtracting the “time offset value”notified in step S208 from the clock value of the other time clock (stepS211).

Next, the decoding unit 22 executes steps S212 to S214, to switch thereferenced time clock unit. In this process, the decoding unit 22firstly judges whether or not all data preceding the “discontinuitypoint index information” of the meta-information has been output (stepS212). For example, in the case where a discontinuous packet has beeninserted in the reproduction target stream data by the missing detectionunit 13 in the stream data recording device 5 at the time of recording,this judgment can be made by judging, when outputting data generated asa result of a decoding process to the output unit 23, whether or not theprocessing has been performed up to the discontinuous packet. In thecase where the reproduction target stream data does not have adiscontinuous packet inserted therein at the time of recording, thedecoding unit 22 may insert data indicating discontinuity at adiscontinuous stream data position upon getting the stream data from thegetting unit 21. As a result, when outputting data generated as a resultof the decoding process to the output unit 23, the decoding unit 2 canjudge whether or not the processing has been performed up to the dataindicating discontinuity.

If the data preceding the discontinuity point still remains (step S213:NO), step S215 is executed without switching the referenced time clockunit, in order to reproduce and output the data preceding thediscontinuity point. If the processing of all of the data preceding thediscontinuity point is completed (step S213: YES), the decoding unit 22switches the referenced time clock unit (step S214). After this, stepS215 is executed to reproduce and output the data succeeding thediscontinuity point. This process of switching the time clock unit isperformed using the time clock unit 26 and the time clock unit 27alternately.

The output unit 23 judges whether or not a reproduction stop instructionis issued by the user, and whether or not the reproducing processreaches the end of the file (step S216). When there is a reproductionstop instruction, the reproducing process ends. When there is noreproduction stop instruction, the procedure returns to step S201 toprocess the next data.

This completes the description of the operational procedure of thestream data reproducing device 6.

According to the above embodiment, when recording stream data in a poorradio wave reception condition, an offset value between a PCR and a timeclock in the stream data recording device is calculated and held asmeta-information. When reproducing the recorded stream data, a timeclock in the stream data reproducing device is corrected based on theoffset value. As a result, the stream data can be reproduced with atiming intended by the broadcasting system.

Second Embodiment

A second embodiment of the present invention is described below.

<Meta-Information>

The following describes meta-information according to the secondembodiment. In the meta-information according to the first embodiment,the start and end of an invalid section are recorded using a STC value.In the meta-information according to the second embodiment, on the otherhand, the start and end of an invalid section are recorded using a PTSassigned to a component that constitutes a program. The component usedhere is any of video, audio, subtitles, and the like. This embodimentdescribes meta-information that uses video data, as one example. FIG. 18shows a data structure of meta-information according to the secondembodiment. The meta-information according to this embodiment is made upof a same number of records as invalid sections detected in stream data,where each record is composed of a “missing start point PTS”, a “missingend point PTS”, “discontinuity point index information”, and a“reproduction period”.

The “missing start point PTS” is a PTS of a video frame of stream datareceived before an invalid section occurs.

The “missing end point PTS” is a PTS of a video frame of stream datareceived after the invalid section ends.

The “discontinuity point index information” is a position of a TS packetincluding the “missing end point PTS”. The data index information may bea serial number starting from a top one of recording target TS packets,an offset value from a file beginning, and the like. In this embodiment,an offset value from a file beginning is used.

The “reproduction period” is a reproduction period of stream datacontained in the invalid section, supposing that such stream data can bereproduced. A value obtained by subtracting the “missing start pointPTS” from the “missing end point PTS” corresponds to the “reproductionperiod”.

<Stream Data Recording Device>

The following describes a stream data recording device 7 that generatesmeta-information having the data structure shown in FIG. 18 in a streamdata recording process.

FIG. 19 shows an internal construction of the stream data recordingdevice 7 according to the second embodiment. The stream data recordingdevice 7 has a construction in which a reproduction period calculationunit 18 is added to the stream data recording device 5 shown in FIG. 5,and the meta-information generation unit 16 in the stream data recordingdevice 5 is replaced with a meta-information generation unit 19.

Construction elements which are the same as those in the stream datarecording device 5 have been given the same reference numerals and theirexplanation has been omitted here.

The reproduction period calculation unit 18 is a functional block that,when notified of a reset detection result from the reset detection unit15, calculates a stream data reproduction period corresponding to asection where recording target stream data is missing due todeterioration in radio wave reception condition and the like. Thereproduction period calculation unit 18 notifies the meta-informationgeneration unit 19 of the calculated reproduction period.

The meta-information generation unit 19 generates meta-informationhaving the data structure shown in FIG. 18, based on a detection resultof the missing detection unit 13 and the reproduction period calculatedby the reproduction period calculation unit 18.

This completes the description of the internal construction of thestream data recording device 7.

<Stream Data Recording Method>

FIG. 20 is a flowchart showing a procedure of a stream data recordingprocess in the stream data recording device 7. The following describesan operational procedure of the stream data recording device 7 withreference to FIG. 20, focusing on the difference from the operationalprocedure of the stream data recording device 5 shown in FIG. 8.

The procedure shown in FIG. 20 is executed upon receiving a recordinginstruction from the user, and can be divided into the following fourmain steps 1-4.

1. Step of detecting an occurrence of an invalid section and getting amissing start point PTS (steps S301-S305).

2. Step of detecting the end of the invalid section and getting amissing end point PTS and discontinuity point index information (stepsS306-S309).

3. Step of detecting PCR reset that occurred in the invalid section, andcalculating a reproduction period (steps S310-S314).

4. Step of recording generated meta-information (steps S315-S316).

First, steps S301-S305 for detecting an occurrence of an invalid sectionin stream data to be recorded are described below. The process of stepsS301-S305 corresponds to the process of steps S101-S105 in FIG. 8, but aprocess (step S305) that is executed when the detected TS packet missingis at a start point of the invalid section (steps S304: YES) differsfrom the process of step S105 in FIG. 8.

In step S305, the missing detection unit 13 notifies themeta-information generation unit 19 of the start of the invalid section.Upon receiving the notification, the meta-information generation unit 19gets an output time of a video frame output before the occurrence of theinvalid section, and holds it as “missing start point PTS” informationof meta-information (step S305). For example, this process can beperformed in the following manner. Each time the packet analysis unit 12analyzes a video PES header and detects a PTS included in the PESheader, the packet analysis unit 12 outputs the detected PTS to themissing detection unit 13. When detecting the start of an invalidsection, the missing detection unit 13 notifies the meta-informationgeneration unit 19 of a last got PTS. This enables the meta-informationgeneration unit 19 to get an output time of a video frame output beforethe occurrence of the invalid section.

Steps S306-S309 for detecting the end of the invalid section and gettinga missing end time and discontinuity point index information aredescribed next. The process of steps S306-S309 corresponds to theprocess of steps S106-S109 shown in FIG. 8, but a process (step S308)that is executed when the detected TS packet missing is at an endpointof the invalid section (step S307: YES) differs from the process of stepS108 in FIG. 8.

In step S308, the missing detection unit 13 notifies themeta-information generation unit 19 of the end of the invalid section.The meta-information generation unit 19 gets an output time of a videoframe output after the end of the invalid section, and holds it as“missing end point PTS” information of the meta-information (step S308).For example, this process can be performed in the following manner. Eachtime the packet analysis unit 12 analyzes a video PES header and detectsa PTS included in the PES header, the packet analysis unit 12 outputsthe detected PTS to the missing detection unit 13. After detecting theend of an invalid section, the missing detection unit 13 notifies themeta-information generation unit 19 of a first got PTS. This enables themeta-information generation unit 19 to get an output time of a videoframe output after the end of the invalid section.

Steps S310-S314 for detecting PCR reset that occurred in the invalidsection and calculating a reproduction period are described next. Theprocess of steps S310-S314 corresponds to the process of steps S110-S112shown in FIG. 8, but a process (steps S312-S314) that is executed whenPCR reset occurred in the invalid section (step S311: YES) differs fromthe procedure in FIG. 8.

In step S312, the reset detection unit 15 gets a time offset value, andnotifies it to the reproduction period calculation unit 18. Upon beingnotified of the time offset value, the reproduction period calculationunit 18 gets the “missing start point PTS” and the “missing end pointPTS” from the meta-information generation unit 19, and calculates areproduction period corresponding to a video frame included in theinvalid section by using the time offset value, the “missing start pointPTS”, and the “missing end point PTS”. The reproduction periodcalculation process will be described in detail later. In step S314 thatfollows, the meta-information generation unit 19 gets the reproductionperiod from the reproduction period calculation unit 18, and holds it asa “reproduction period” of the meta-information.

The process of steps S315 and S316 for recording generatedmeta-information when the TS recording ends is the same as the processof steps S113 and S114 in FIG. 8.

This completes the description of the operational procedure of thestream data recording device 7.

<Reproduction Period Calculation Method>

The following describes the method of calculating a reproduction periodcorresponding to stream data included in an invalid section in step S313in FIG. 20, in detail.

FIG. 21 shows a PTS included in stream data and a state of change intime clock, when no PCR reset occurred in an invalid section. Ahorizontal axis shows a continuous time from the start of stream datareception, and a vertical axis shows a value of the time clock. Adiagonally shaded area 151 shows an invalid section. A straight line 152shows a counting state of the time clock unit 14. An invalid sectionstart PTS 154 is a value of the time clock unit 14 at an output time ofa video frame that is output before the invalid section occurs. Aninvalid section end PTS 155 is a value of a PTS got from a video PESheader after the invalid section ends.

As shown in FIG. 21, in the case where no PCR reset occurred in theinvalid section, a PCR included in the stream data and the time clockunit 14 remain synchronous with each other after the invalid sectionends. In such a situation, since the invalid section end PTS 155 is setso that processing is performed based on a STC value shown by the timeclock unit 14, a reproduction period corresponding to the invalidsection is a difference between the invalid section end PTS 155 and theinvalid section start PTS 154.

On the other hand, FIG. 22 shows a PTS included in stream data and astate of change in time clock, in the case where PCR reset occurred inan invalid section. In FIG. 22, a horizontal axis shows a continuoustime from the start of stream data reception. A vertical axis shows avalue of the time clock. A diagonally shaded area 161 shows an invalidsection. A black circle shows PCR time information included in a TSheader. A straight line 162 and a straight line 163 show a countingstate of the time clock unit 14. A broken line 164 shows a continuousPCR value included in a TS header until a PCR is first got after the endof the invalid section. An invalid section start PTS 165 shows a valueof the time clock unit 14 at an output time of a video frame that isoutput before the invalid section occurs. An invalid section end PTS 166shows a PTS value got from a video PES header after the invalid sectionends. A time offset value 167 is a difference between the straight line162 and the broken line 164.

As shown in FIG. 22, in the case where PCR reset occurred in the invalidsection, a PCR and the time clock unit 14 are not synchronous with eachother after the invalid section ends. The invalid section start PTS 165is based on a PCR that precedes the PCR reset, and so is synchronouswith the time clock unit 14. However, the invalid section end PTS 166 isset so that processing is performed based on a PCR that succeeds the PCRreset, and so is not synchronous with the time clock unit 14. Thus, theinvalid section end PTS 166 and the invalid section start PTS 165 havedifferent bases. Accordingly, merely calculating a difference betweenthe invalid section end PTS 166 and the invalid section start PTS 165cannot yield a reproduction period corresponding to the invalid section.

In view of this, the invalid section end PTS 166 is modified to have thesame basis as the invalid section start PTS 165, by using the timeoffset value 167. A modified end PTS 168 is an invalid section end PTSobtained as a result of modifying the invalid section end PTS 166 byadding the time offset value 167 so as to have the same basis as theinvalid section start PTS 165. The modified end PTS 168 and the invalidsection start PTS 165 have the same basis, so that the reproductionperiod corresponding to the invalid section can be obtained bycalculating a difference between the modified end PTS 168 and theinvalid section start PTS 165.

The following describes a procedure for realizing the above reproductionperiod calculation method. FIG. 23 is a flowchart showing a procedure ofcalculating a reproduction period by the reproduction period calculationunit 18.

First, the reproduction period calculation unit 18 gets a missingendpoint PTS from the meta-information generation unit 19 (step S351).Also, if PCR reset occurred in an invalid section, the reproductionperiod calculation unit 18 gets a time offset value calculated by thereset detection unit 15. The reproduction period calculation unit 18adds the time offset value to the missing endpoint PTS, therebymodifying the missing end point PTS (step S352). When doing so, themissing end point PTS in meta-information is not rewritten. If no PCRreset occurred in the invalid section, step S352 is not performed. Next,the reproduction period calculation unit 18 gets a missing start pointPTS from the meta-information generation unit 19 (step S353). Thereproduction period calculation unit 18 subtracts the missing startpoint PTS from the missing end point PTS, to calculate a reproductionperiod of stream data included in the invalid section (step S354). Thereproduction period calculation unit 18 notifies the meta-informationgeneration unit 19 of the calculated reproduction period (step S314).

This completes the description of the method of calculating areproduction period corresponding to stream data included in an invalidsection.

<PTS Interpolation Process>

As a modification example of the method of obtaining a missing startpoint PTS and a missing end point PTS, the following describes a methodof obtaining PTSs that accurately match a missing start point and amissing end point, by interpolating a PTS for an audio frame and a videoframe using a frame rate and PTS information included in a PES header.

FIG. 24 shows a relation between an audio frame and a PTS included in anaudio PES header.

The upper tier shows an audio PES. The legend “including PTS” indicatesa PES packet which contains PTS information in its PES header, whereasthe legend “not including PTS” indicates a PES packet which does notcontain PTS information in its PES header. A reception deteriorationsection is a section where the radio wave reception conditiondeteriorates and stream data cannot be got properly.

The lower tier shows audio frames generated by decoding the audio PES.When a PTS included in a PES header is used as a missing start PTS instep S305 in FIG. 20, a point A7 in FIG. 24 serves as a start point ofan invalid section. This causes no audio frames from the point A7 to apoint B7 to be output. However, by using an interpolated PTS at thepoint B7 as the missing start PTS instead of the PTS included in the PESheader, it is possible to reproduce more stream data.

The method of calculating the PTS at the point B7 is given below. First,the stream data included from the point A7 to the point B7 is decodedand the number of frames is obtained. A reproduction period of theframes from the point A7 to the point B7 is calculated from the numberof frames and a frame rate defined for the stream data. The PTS at thepoint B7 can be obtained by adding the calculated reproduction period tothe PTS at the point A7. In the case of a fixed bit rate, it is alsopossible to calculate from a byte length of an audio ES from the pointA7 to the point B7 and the bit rate.

Also, when a PTS included in a PES header is used as a missing end PTSin step S308 in FIG. 20, a point D7 in FIG. 24 serves as an end point ofthe invalid section. This causes no audio frames from a point C7 to thepoint D7 to be output. However, by using an interpolated PTS at thepoint C7 as the missing end PTS instead of the PTS included in the PESheader in the same way as the missing start PTS, more stream data can bereproduced.

The method of calculating the PTS at the point C7 is given below. As inthe method of calculating the PTS at the point B7, the PTS at the pointC7 can be obtained by calculating a reproduction period of frames fromthe point C7 to the point D7 based on the number of frames included fromthe point C7 to the point D7 and a frame rate, and subtracting thecalculated reproduction period from the PTS at the point D7.

Though audio data is used as one example here, it should be obvious thatthe same applies to video data.

This completes the description of the stream data recording device 7.

<Stream Data Reproducing Device>

The following describes a stream data reproducing device 8 that correctsa STC value using meta-information according to the second embodimentand reproduces stream data. FIG. 25 shows an internal construction ofthe stream data reproducing device 8 according to the second embodiment.The stream data reproducing device 8 has a construction in which thetime clock unit 27 is omitted from the stream data reproducing device 6shown in FIG. 15, and the decoding unit 22, the meta-informationanalysis unit 24, and the time clock control unit 25 in the stream datareproducing device 6 are respectively replaced with a decoding unit 28,a meta-information analysis unit 29, and a time clock control unit 30.

Construction elements which are the same as those in the stream datareproducing device 6 have been given the same reference numerals andtheir explanation has been omitted here.

The decoding unit 28, as with the decoding unit 22, decodes stream datagot from the getting unit 21 to generate component data such as videodata, audio data, subtitle data, and the like, and outputs, withreference to a STC value of the time clock unit 26, each component tothe output unit 23 with a timing at which a PTS set in the componentmatches the clock value. Also, when PCR information is got from streamdata, the decoding unit 28 notifies the time clock control unit 25 of aPCR value.

The decoding unit 28 differs from the decoding unit 22 in the followingpoint. The decoding unit 28 judges whether or not data to be decoded isdiscontinuous from preceding data by referencing “discontinuity pointindex information” of meta-information and, if the data isdiscontinuous, keeps outputting a frame which was decoded immediatelybefore, for a period of time shown by a “reproduction period” of themeta-information. After the time shown by the “reproduction period” haselapsed, the decoding unit 28 notifies the time clock control unit 30that a reproduction period corresponding to an invalid section ends.

As a process that is performed when the decoding process has reached thedata that is discontinuous from the preceding data, instead ofdisplaying a still image of the frame decoded immediately before, thescreen may be turned black or a color other than black for the period oftime shown by the “reproduction period”. As an alternative, as soon asthe decoding process reaches the data that is discontinuous from thepreceding data, a reproduction position may be jumped to thediscontinuous data by instructing the time clock control unit 30 toreset the time clock value.

The meta-information analysis unit 29 analyzes meta-information got fromthe getting unit 21, and notifies the decoding unit 28 of “discontinuitypoint index information” and a “reproduction period”. Also, themeta-information analysis unit 29 notifies the time clock control unit30 of a “missing endpoint PTS” that is necessary to reset the STC value.

The time clock control unit 30 synchronizes the time clock unit 26 withthe PCR value notified from the decoding unit 28. Also, when notified ofthe end of the reproduction period corresponding to the invalid sectionfrom the decoding unit 28, the time clock control unit 30 resets thetime clock unit 26 to a time shown by the “missing end point PTS”notified from the meta-information analysis unit 29.

This completes the description of the internal construction of thestream data reproducing device 8.

<Stream Data Reproducing Method>

The following describes an operational procedure of getting stream datafrom the recording medium 4 and reproducing the stream data by thestream data reproducing device 8. FIG. 26 shows a procedure of a streamdata reproducing process in the stream data reproducing device 8according to the second embodiment.

When a reproducing process is launched in accordance with an instructionfrom the user, the getting unit 21 reads meta-information from therecording medium 4 and outputs it to the meta-information analysis unit29 (step S401). The meta-information analysis unit 29 selects, amongrecords registered in the meta-information, a record whose“discontinuity point index information” relates to a nearest invalidsection after the current stream data reproduction position (step S402).The meta-information analysis unit 29 notifies the decoding unit 28 ofthe “discontinuity point index information” and a “reproduction period”of the selected record, and notifies the time clock control unit 30 of a“missing end point PTS” of the selected record (step S403).

The decoding unit 28 receives reproduction target stream data read fromthe recording medium 4 by the getting unit 21 and index information ofthe got part relative to a file beginning (step S404), and compares theindex information from the file beginning with the “discontinuity pointindex information” of the meta-information got from the meta-informationanalysis unit 29, to judge whether or not stream data to be processedfor reproduction is discontinuous from preceding data (step S405).

When the stream data to be processed is not discontinuous from thepreceding data (step S406: NO), the decoding unit 28 performs a decodingprocess to generate video data, audio data, and subtitle data. Afterthis, the decoding unit 28 outputs decoded data of each component to theoutput unit 23 with a timing at which a PTS of the component matches theSTC value of the time clock unit 26 (step S413).

When the stream data to be processed is discontinuous from the precedingdata (step S406), the decoding unit 28 judges whether or not all datapreceding the “discontinuity point index information” of themeta-information has been output (step S407). For example, in the casewhere the reproduction target stream data has a discontinuous packetinserted therein at the time of recording, this judgment can be realizedby checking, when outputting data generated as a result of the decodingprocess to the output unit 23, whether or not the processing has beenperformed up to the discontinuous packet. In the case where thereproduction target stream data does not have a discontinuous packetinserted therein at the time of recording, the decoding unit 22 mayinsert data indicating discontinuity at a discontinuous stream dataposition, when getting the stream data from the getting unit 21. As aresult, when outputting data generated by the decoding process to theoutput unit 23, the decoding unit 22 can judge whether or not theprocessing has been performed up to the data indicating discontinuity.

If data preceding the discontinuity point remains (step S408: NO), stepS413 is executed to reproduce and output the data preceding thediscontinuity point. If the processing of all data preceding thediscontinuity point is completed (step S408: YES), the decoding unit 28judges whether or not the “reproduction period” of the meta-informationhas elapsed (step S409). This judgment can be performed as follows.First, the decoding unit 28 gets a STC value at an output time of thelast data preceding the discontinuity point from the time clock unit 26,and adds the “reproduction period” of the meta-information to the STCvalue. The elapse of the reproduction period can be judged based onwhether or not a result of the addition matches the clock value of thetime clock unit 26.

If the reproduction period has not elapsed (step S410: NO), the decodingunit 28 waits until the reproduction period has elapsed, withoutoutputting data succeeding the discontinuity point. When thereproduction period has elapsed (step S410: YES), the decoding unit 28notifies the time clock control unit 30 that the reproduction periodcorresponding to the invalid section ends (step S411). Upon receivingthe notification, the time clock control unit 30 resets the time clockunit 26 to the “missing end point PTS” notified from themeta-information analysis unit 29 in step S403 (step S412). After this,step S413 is executed to reproduce and output the data succeeding thediscontinuity point.

The output unit 23 judges whether or not a reproduction stop instructionis issued from the user and whether or not the reproducing process hasreached the file end (step S414). When there is a reproduction stopinstruction (step S414: YES), the reproducing process ends. When thereis no reproduction stop instruction (step S414: NO), the procedurereturns to step S401 to process the next data.

This completes the description of the operational procedure of thestream data reproducing device 8.

Though the second embodiment of the present invention describes the casewhere video data is used to generate meta-information, audio data mayinstead be used.

According to the above embodiment, a reproduction period of one of videodata and audio data in a section that cannot be received properly isestimated and meta-information including the reproduction period isgenerated and held. As a result, when reproducing stream data recordedin a poor radio wave reception condition, it is possible to performreproduction with a timing intended by the broadcasting system.

Third Embodiment

The following describes a third embodiment of the present invention.

<Meta-Information>

In the second embodiment of the present invention, meta-information isgenerated using time information of one of audio data and video data. Inthe third embodiment, on the other hand, meta-information is generatedusing time information of both audio data and video data. FIG. 27 showsa data structure of meta-information according to the third embodiment.

The meta-information according to this embodiment includes a recordcorresponding to video data and a record corresponding to audio data foreach invalid section detected in stream data, and so is made up ofrecords that are twice as many as the number of invalid sections. Arecord having an odd ordinal number is meta-information corresponding tovideo data, and a record having an even ordinal number ismeta-information corresponding to audio data.

Each record is composed of a “missing start point PTS”, a “missing endpoint PTS”, “discontinuity point index information”, and a “reproductionperiod”.

The “missing start point PTS” is a PTS of an audio frame or a videoframe of stream data received before an invalid section occurs.

The “missing end point PTS” is a PTS of an audio frame or a video frameof stream data received after the invalid section ends.

The “discontinuity point index information” is a position of a TS packetthat includes the “missing endpoint PTS”. A number assigned startingfrom a top one of recording target TS packets, an offset value from afile beginning, or the like can be used as data index information. Inthe third embodiment of the present invention, an offset value from afile beginning is used.

The “reproduction period” is a reproduction period of an audio frame ora video frame of stream data included in the invalid section, supposingthat such stream data can be reproduced. A value obtained by subtractingthe “missing start point PTS” from the “missing end point PTS”corresponds to the “reproduction period”.

<Stream Data Recording Method>

The following describes a stream data recording process according to thethird embodiment with reference to FIG. 20, focusing on the differencesfrom the stream data recording process according to the secondembodiment.

A first difference from the second embodiment lies in that, in step S305executed when the start point of the invalid section is detected, amissing start point PTS is got for each of a video frame and an audioframe.

In detail, in step S305, the meta-information generation unit 19 gets aPTS of a video frame output before the occurrence of the invalidsection, and holds the got PTS in a record of an odd ordinal number inthe meta-information as “missing start point PTS” information of videodata. Also, the meta-information generation unit 19 gets a PTS of anaudio frame output before the occurrence of the invalid section, andholds the got PTS in a record of an even ordinal number in themeta-information as “missing start point PTS” information of audio data.

A second difference from the second embodiment lies in that, in stepS308 executed when the endpoint of the invalid section is detected, amissing end point PTS is got for each of a video frame and an audioframe.

In detail, in step S308, the meta-information generation unit 19 gets aPTS of a video frame output after the end of the invalid section, andholds the got PTS in the record of the odd ordinal number in themeta-information as “missing end point PTS” information of video data.Also, the meta-information generation unit 19 gets a PTS of an audioframe output after the end of the invalid section, and holds the got PTSin the record of the even ordinal number in the meta-information as“missing end point PTS” information of audio data.

A third difference from the second embodiment lies in that, in stepS309, recording index information is got for each of a video frame andan audio frame.

In detail, in step S309, the meta-information generation unit 19 gets arecording position of a TS packet including the “missing end point PTS”information of video data from the recording control unit 17, and holdsthe got recording position in the record of the odd ordinal number inthe meta-information as “discontinuity point index information” of videodata. Also, the meta-information generation unit 19 gets a recordingposition of a TS packet including the “missing end point PTS”information of audio data from the recording control unit 17, and holdsthe got recording position in the record of the even ordinal number inthe meta-information as “discontinuity point index information” of audiodata.

A fourth difference from the second embodiment lies in that, in stepS313, a reproduction period corresponding to data included in theinvalid section is calculated for each of a video frame and an audioframe.

In detail, in step S313, the reproduction period calculation unit 18gets the “missing start point PTS” and the “missing end point PTS” ofvideo data from the record of the odd ordinal number generated by themeta-information generation unit 19, and calculates a reproductionperiod corresponding to video data included in the invalid section.Also, the reproduction period calculation unit 18 gets the “missingstart point PTS” and the “missing end point PTS” of audio data from therecord of the even ordinal number generated by the meta-informationgeneration unit 19, and calculates a reproduction period correspondingto audio data included in the invalid section. Note here that a timeoffset value is a difference between the PCR and the STC value of thetime clock unit 14, and therefore is common to video data and audiodata. Accordingly, the reproduction period of the video data and thereproduction period of the audio data can be calculated by the samelogic.

This completes the description of the stream data recording methodaccording to the third embodiment.

<Stream Data Reproducing Device>

The following describes a stream data reproducing device 9 that correctsthe STC value using the meta-information according to the thirdembodiment and reproduces the stream data. FIG. 28 shows an internalconstruction of the stream data reproducing device 9 according to thethird embodiment. The stream data reproducing device 9 has aconstruction in which a status display unit 33 is added to the streamdata reproducing device 8 shown in FIG. 25, and the decoding unit 28 andthe time clock control unit 30 in the stream data reproducing device 8are respectively replaced with a decoding unit 31 and a time clockcontrol unit 32.

Construction elements which are the same as those in the stream datareproducing device 8 have been given the same reference numerals andtheir explanation has been omitted here.

The decoding unit 31 decodes stream data got from the getting unit 21,to generate video data and audio data. The decoding unit 31 thenreferences the time clock unit 26, and outputs the generated audio dataor video data to the output unit 23 with a fixed interval that is basedon a frame rate of the corresponding data.

Also, the decoding unit 31 judges whether or not data to be decoded isdiscontinuous from preceding data, with reference to “discontinuitypoint index information” of meta-information. If the data isdiscontinuous, the decoding unit 31 stops outputting to the output unit23 for a period of time shown by a “reproduction period” of themeta-information.

The time clock control unit 32 resets the time clock unit 26 inaccordance with a PCR in the stream data, when the reproduction begins.During the reproduction, the time clock control unit 32 does not resetthe time clock unit 26.

The status display unit 33 gets the meta-information from themeta-information analysis unit 29, generates a screen for notifying theuser that the stream data being recorded has an invalid section, andoutputs the screen to a monitor via the output unit 23. For example, thedisplay process by the status display unit 33 is performed bydisplaying, on a bar object representing the entire stream data, eachinvalid section with a proportion corresponding to a time length of thesection, as shown in FIG. 29A. Alternatively, as shown in FIG. 29B, aposition of each invalid section may be displayed on a bar objectrepresenting a length of reproducible stream data. Alternatively, asshown in FIG. 29C, a broadcast time period of recording target streamdata and a reproducible time period of actually recorded stream data maybe presented to the user. Also, when requesting the user to specify ajump destination, the status display unit 33 generates an image showinga section specifiable as a jump destination and a section unspecifiableas a jump destination on one bar object, and outputs it to the monitor,as shown in FIG. 29D.

Furthermore, during stream data reproduction, the status display unit 33generates an image showing a reproduction status and outputs it to themonitor. FIG. 30A schematically shows the mobile reception terminal 3 onwhich the image showing the reproduction status is displayed. Duringstream data reproduction, a decoded reproduction image is displayed inan image output part 10 a and reproduction status information generatedby the status display unit 33 is displayed in a status display part 10b, on a monitor 10 of the mobile reception terminal 3. The reproductionstatus information displayed in the status display part 10 b includes areproduction position display bar object 10 c and a reproduction perioddisplay 10 d.

The following describes a method of displaying an image showing areproduction status. FIG. 30B shows an example method of displaying animage showing a reproduction status.

The reproduction position display bar object 10 c is a bar objectrepresenting a length of entire stream data. Each invalid section isdisplaced on the reproduction position display bar object 10 c accordingto a position and a length of the section. Each section partitioned onthe bar object is displayed in a color that differs depending on a typeof component reproducible in that section. In more detail, a section 10e in which both video and audio are reproducible is displayed in green,a section 10 f showing an invalid section of only one of video and audiois displayed in orange, and a section 10 g in which invalid sections ofboth video and audio overlap with each other is displayed in red.Furthermore, a part of the reproduction position display bar object 10 ccorresponding to already reproduced stream data is enclosed by a thickline box from the left end, in order to make it easier to recognize thecurrent reproduction position.

The reproduction period display 10 d is a character string showing thecurrent reproduction time and the reproduction period of the entirestream data side-by-side. The character string of the reproductionperiod display 10 d is displayed when the current reproduction positionis an invalid section of video and the image output part 10 a is turnedblack. Here, a display color of the reproduction period display 10 d maybe changed according to a type of component being reproduced, in thesame manner as the reproduction position display bar object 10 c.

Furthermore, when the reproduction position reaches an invalid sectionin which invalid sections of both video and audio overlap with eachother and whose “reproduction period” of meta-information is no smallerthan a predetermined period (e.g. 10 seconds), a warning image such as apop-up 10 h or an icon may be displayed in the image output part 10 a.By making such a warning, the user can continuously recognize thereproduction for a long time, by performing an appropriate operationsuch as a skip operation.

This completes the description of the internal construction of thestream data reproducing device 9.

<Stream Data Reproducing Method>

The following describes an operational procedure of getting stream datafrom the recording medium 4 and reproducing it by the stream datareproducing device 9. FIG. 31 shows a procedure of a stream datareproducing process in the stream data reproducing device 9 according tothe third embodiment.

When a reproducing process is launched in accordance with an instructionfrom the user, the getting unit 21 reads meta-information from therecording medium 4 and outputs it to the meta-information analysis unit29 (step S501). The meta-information analysis unit 29 selects, amongrecords registered in the meta-information, a record of video data withan odd ordinal number whose “discontinuity point index information”relates to a nearest invalid section after the current stream datareproduction position, and a record of audio data with an even ordinalnumber following the odd ordinal number (step S502). Themeta-information analysis unit 29 notifies the decoding unit 28 of the“discontinuity point index information” and “reproduction period” of theselected two records, and notifies the time clock control unit 30 of a“missing end point PTS” of the selected two records (step S503). Thedecoding unit 31 receives reproduction target stream data read from therecording medium 4 by the getting unit 21, and index information of thegot part relative to a file beginning (step S504).

Subsequently, a process of steps S505-S511 is executed for each of audiodata and video data in parallel.

In step S505, the decoding unit 31 judges whether or not video data tobe processed for reproduction is discontinuous from preceding data, byreferencing the “discontinuity point index information” of video datawith the odd ordinal number in the meta-information. The decoding unit31 also judges whether or not audio data to be processed forreproduction is discontinuous from preceding data, by referencing the“discontinuity point index information” of audio data with the evenordinal number in the meta-information.

When the video data or audio data to be processed is not discontinuousfrom the preceding data (step S506: NO), the decoding unit 31 performs adecoding process to generate video data or audio data. The decoding unit31 outputs the generated audio data or video data to the output unit 23with a fixed interval that is based on a frame rate of the data, byreferencing the time clock unit 26 (step S511). Note here that, in stepS511, a top audio frame and a top video frame at the start of thereproduction are each output with a timing at which a PTS of the framematches the clock value of the time clock unit 26, and a subsequentaudio frame and a subsequent video frame are each output with a fixedinterval based on a corresponding frame rate.

When the video data or audio data to be processed is discontinuous fromthe preceding data (step S506: YES), the decoding unit 31 judges whetheror not all video data preceding the “discontinuity point indexinformation” with the odd ordinal number in the meta-information hasbeen output, or whether or not all audio data preceding the“discontinuity point index information” with the even ordinal number inthe meta-information has been output (step S507). If data preceding thediscontinuity point remains (step S508: NO), step S511 is executed tooutput the data preceding the discontinuity point. When all video datapreceding the discontinuity point has been output (step S508: YES), thedecoding unit 31 judges whether or not the “reproduction period” ofvideo data with the odd ordinal number in the meta-information haselapsed (step S509). When all audio data preceding the discontinuitypoint has been output (step S508: YES), the decoding unit 31 judgeswhether or not the “reproduction period” of audio data with the evenordinal number in the meta-information has elapsed (step S509). If thereproduction period has not elapsed (step S510: NO), the decoding unitwaits for the elapse of the reproduction period, without outputting datasucceeding the discontinuity point.

When the reproduction period has elapsed (step S510: YES), the decodingunit 31 executes step S511 to reproduce and output the data succeedingthe discontinuity point. When reproducing and outputting the stream datasucceeding the discontinuity point, the reproduction and output arelaunched with a timing at which the “reproduction period” of themeta-information has elapsed, and subsequently the stream data is outputwith the fixed interval based on the frame rate.

This completes the description of the operational procedure of thestream data reproducing device 9.

According to the above embodiment, reproduction periods of both videodata and audio data in a section that could not be received properly areestimated and meta-information showing these reproduction periods isgenerated and held. At the time of reproduction, only the timings ofstarting video data and audio data are synchronized with PTSs, and thesubsequent data is output based on the frame rate. When reproducingstream data recorded in a poor radio wave reception condition, thereproduction is put in a standby state for the reproduction period inthe meta-information for each of video data and audio data. In this way,video data and audio data can be reproduced synchronously with a timingintended by the broadcasting system after the end of the invalidsection.

Other Modifications

Although the present invention has been described by way of the aboveembodiments, it should be obvious that the present invention is notlimited to the above. For example, the following modifications areapplicable.

(1) The present invention also applies to the stream data recordingmethod and reproducing method disclosed in the procedures of theflowcharts described in each of the above embodiments. The methods maybe realized by a computer program that includes program code for havinga computer operate according to the procedures. Such a computer programmay be distributed as a digital signal.

The present invention may be realized by a computer-readable recordingmedium, such as a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, aDVD-ROM, a DVD-RAM, a BD (Blu-ray Disc), or a semiconductor memory, onwhich the above computer program or digital signal is recorded.

The computer program or digital signal that achieves the presentinvention may also be transmitted via, for example, a network such as anelectronic communications network, a wired or wireless communicationsnetwork, or an internet.

The computer program or the digital signal may be provided to anindependent computer system by distributing a recording medium on whichthe computer program or the digital signal is recorded, or bytransmitting the computer program or the digital signal via a network.The independent computer system may then execute the computer program orthe digital signal to function as the present invention.

(2) The present invention can also be realized by a LSI that controlsthe stream data recording device and the stream data reproducing devicedescribed in each of the first to third embodiments. Such a LSI can beachieved by integrating the functional blocks enclosed by a broken linebox in each of FIGS. 5, 15, 19, 25, and 28. There functional blocks maybe partially or entirely implemented by one chip.

Though the LSI is described here, the circuit may be called an IC, asystem LSI, a super LSI, or an ultra LSI, depending on the degree ofintegration.

Also, the integration is not limited to the LSI, and may be performedusing a dedicated circuit or a general processor. A FPGA (FieldProgrammable Gate Array) that can be programmed after LSI manufacturingor a reconfigurable processor capable of reconfiguring connections andsettings of circuit cells in an LSI may be used.

Also, if an integrated circuit technique that replaces a LSI emergesfrom advancement of semiconductor technology or other derivativetechnology, such a technique can be used for the integration of thefunctional blocks and components. For instance, biotechnology may beadapted in this way.

(3) The first to third embodiments mainly describe the case ofrecording/reproducing stream data that is transmitted by a digitalbroadcast signal, but the same effects can equally be obtained forstream data received via a network.

The present invention is not limited to stream data got from a digitalbroadcast signal, and can also be realized as a stream data editingdevice that generates meta-information for stream data already recordedon a recording medium. In detail, such a stream data editing device canbe realized by the construction shown in FIG. 5 or 19, where stream dataalready recorded on the recording medium 4 is read by the getting unit11 and processed. According to this construction, it is possible to,after recording stream data got from a broadcast wave onto a recordingmedium, read the stream data and generate meta-information while thedevice is in an idle state or the like, which contributes to a reductionin processing load when recording stream data.

(4) The first to third embodiments describe the case wheremeta-information is recorded on the same recording medium as streamdata, but stream data and meta-information according to the presentinvention may be recorded on separate recording media so long as theyare associated with each other. As one example, the present inventioncan be applied in the following way. If the data size of the stream datais larger than the capacity of the recording medium, the stream data isrecorded separately over a plurality of recording media, andmeta-information of an invalid section in a part of stream data recordedon each recording medium is collectively recorded on one recordingmedium, with common IDs being respectively assigned to the parts ofstream data and their corresponding meta-information.

(5) The above embodiments and modifications can be freely combined.

INDUSTRIAL APPLICABILITY

When recording stream data, the stream data recording device accordingto the present invention generates time offset information forcorrecting a STC value for a section in which a PCR included in thestream data is unknown due to deterioration in radio wave receptioncondition. When reproducing the stream data, the stream data reproducingdevice according to the present invention can reproduce the stream datawith a timing intended by a broadcasting system, by correcting a timeclock using this time offset information. Since the above effectivemeasure can be taken even when the radio wave reception conditiondeteriorates during stream data recording, the present invention isuseful for, for example, digital broadcast reception by a mobilereception terminal.

1. A stream data reproducing device that reads stream data includingpieces of clock reference information from a recording medium andreproduces the stream data, the stream data reproducing devicecomprising: a reading unit operable to read the stream data; a timeclock unit operable to count a time synchronously with a time shown byeach piece of clock reference information; an information getting unitoperable to get index information and time correction information, theindex information specifying a position, in the stream data, of aninvalid section where a part of the stream data was missing, and thetime correction information being used for correcting the time of thetime clock unit; a resetting unit operable to reset the time clock unitbased on the time correction information, when performing reproductionat the position specified by the index information; and a reproductioncontrol unit operable to reproduce a frame in the stream data at apredefined presentation time, based on the time of the time clock unit;wherein the resetting unit resets the time clock unit when judging thatthe piece of clock reference information included in the invalid sectionshows a discontinuous time for synchronization of the time clock unit.2. A stream data reproducing device that reads stream data includingpieces of clock reference information from a recording medium andreproduces the stream data, the stream data reproducing devicecomprising: a reading unit operable to read the stream data; a timeclock unit operable to count a time synchronously with a time shown byeach piece of clock reference information; an information getting unitoperable to get index information and time correction information, theindex information specifying a position, in the stream data, of aninvalid section where a part of the stream data was missing, and thetime correction information being used for correcting the time of thetime clock unit; a resetting unit operable to reset the time clock unitbased on the time correction information, when performing reproductionat the position specified by the index information; and a reproductioncontrol unit operable to reproduce a frame in the stream data at apredefined presentation time, based on the time of the time clock unit;wherein the reproduction control unit stops reproducing the frame in thestream data when the reproduction reaches a position specified by theindex information and, in accordance with a time of the time clock unitafter resetting by the resetting unit, resumes the reproduction from aframe in the stream data after the invalid section.
 3. A stream datareproducing device that reads stream data including pieces of clockreference information from a recording medium and reproduces the streamdata, the stream data reproducing device comprising: a reading unitoperable to read the stream data; a time clock unit operable to count atime synchronously with a time shown by each piece of clock referenceinformation; an information getting unit operable to get indexinformation and time correction information, the index informationspecifying a position, in the stream data, of an invalid section where apart of the stream data was missing, and the time correction informationbeing used for correcting the time of the time clock unit; a resettingunit operable to reset the time clock unit based on the time correctioninformation, when performing reproduction at the position specified bythe index information; and a reproduction control unit operable toreproduce a frame in the stream data at a predefined presentation time,based on the time of the time clock unit; wherein the time correctioninformation includes: end time information showing the time of the timeclock unit at an end of the invalid section when recording the streamdata; and time offset information which is a difference between a timeshown by a piece of clock reference information got after the end of theinvalid section and the time of the time clock unit at the getting ofthe piece of clock reference information, when recording the streamdata, wherein the time clock unit includes a first time clock and asecond time clock each of which individually counts a time, wherein theresetting unit, when the stream data is read up to the positionspecified by the index information, sets one of the first time clock andthe second time clock that is not being used by the reproduction controlunit for the frame reproduction, to a time obtained by adding the endtime information and the time offset information, and wherein thereproduction control unit, when the reproduction reaches the positionspecified by the index information, switches a time clock used for theframe reproduction, from the other one of the first time clock and thesecond time clock to the one of the first time clock and the second timeclock.
 4. A stream data reproducing device that reads stream dataincluding pieces of clock reference information from a recording mediumand reproduces the stream data, the stream data reproducing devicecomprising: a reading unit operable to read the stream data; a timeclock unit operable to count a time synchronously with a time shown byeach piece of clock reference information; an information getting unitoperable to get index information and time correction information, theindex information specifying a position, in the stream data, of aninvalid section where a part of the stream data was missing, and thetime correction information being used for correcting the time of thetime clock unit; a resetting unit operable to reset the time clock unitbased on the time correction information, when performing reproductionat the position specified by the index information; and a reproductioncontrol unit operable to reproduce a frame in the stream data at apredefined presentation time, based on the time of the time clock unitwherein the time correction information includes: missing timeinformation showing a reproduction period corresponding to the missingpart of the stream data in the invalid section; and a presentation timedefined in a frame of at least one of video, audio, and subtitles thatis included in the stream data after an end of the invalid section,wherein the reproduction control unit, when the reproduction of thestream data reaches the position specified by the index information,stops the reproduction of the stream data for the reproduction periodshown by the missing time information, and resumes the reproduction fromthe frame in which the presentation time is defined after thereproduction period has elapsed in a state where the reproduction isstopped, and wherein the resetting unit sets the time clock unit to thepresentation time, after the reproduction period has elapsed from whenthe reproduction is stopped.
 5. A stream data reproducing device thatreads stream data including pieces of clock reference information from arecording medium and reproduces the stream data, the stream datareproducing device comprising: a reading unit operable to read thestream data; a time clock unit operable to count a time synchronouslywith a time shown by each piece of clock reference information; aninformation getting unit operable to get index information and timecorrection information, the index information specifying a position, inthe stream data, of an invalid section where a part of the stream datawas missing, and the time correction information being used forcorrecting the time of the time clock unit; a resetting unit operable toreset the time clock unit based on the time correction information, whenperforming reproduction at the position specified by the indexinformation; a reproduction control unit operable to reproduce a framein the stream data at a predefined presentation time, based on the timeof the time clock unit; and a status display unit operable to display anobject that represents an entire length of the stream data recorded onthe recording medium; wherein, when the invalid section is located inthe stream data, the status display unit displays a position of theinvalid section on the object.
 6. The stream data reproducing device ofclaim 5, wherein when the invalid section is located in the stream data,the status display unit displays a first region and a second region onthe object so as to be mutually distinguishable, the first regionindicating a position and a length of a section to which a jump ispossible, the second region indicating a position and a length of asection to which a jump is not possible.
 7. The stream data reproducingdevice of claim 5, wherein when the invalid section is located in thestream data, the status display unit displays a position, a length, anda region indicating a quality level of the invalid section on theobject.